package cn.tedu.baking.controller;

import cn.tedu.baking.pojo.vo.BannerVO;
import cn.tedu.baking.response.common.JsonResult;
import cn.tedu.baking.service.IBannerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Author：毕龙
 * Date: 2024/8/16 15:36
 */
@RestController
@RequestMapping("/v1/banners/")
@Slf4j
public class BannerController {

    @Autowired
    private IBannerService iBannerService;
    public BannerController(){
        log.debug("创建BannerController对象");
    }

    @GetMapping("/selectAll")
    public JsonResult selectBannersAll() {
        log.debug("获取前端的请求路径收到");
        List<BannerVO> vo =  iBannerService.selectBannersAll();
        return JsonResult.ok(vo);
    }




}
